<script type="text/html" id="invoicetpl">
    <%for(var i=0;i < orderList.length;i++){%>
    <%var order=orderList[i];%>
    <div style="padding:0px;page-break-after: always;">
        <h3 style="padding: 8px 5px;">发货单</h3>
        <table style="width:100%;font-size:14px;" class="baseinfo">
            <tr>
                <td style="width:50%">
                    <div>订单号：<%=order.order_sn%></div>
                </td>
                <td>
                    <div>用户：<%=order.user && order.user.nickname%></div>
                </td>
            </tr>
            <tr>
                <td style="width:50%">地址：<%=order.address%></td>
                <td>总件数：<%=order.nums%></td>
            </tr>
        </table>
        <table style="width:100%;font-size:14px;" class="deliverytable">
            <thead>
            <tr>
                <th>商品ID</th>
                <th>
                    <div style="width:50px;">货号</div>
                </th>
                <th style="text-align: left;">
                    <div style="width:220px;">名称</div>
                </th>
                <th>
                    <div style="width:100px;">属性</div>
                </th>
                <th>市场价</th>
                <th>商城价</th>
                <th>数量</th>
            </tr>
            </thead>
            <tbody>
            <%for(var j=0;j< order.order_goods.length;j++){%>
            <%var goods=order.order_goods[j];%>
            <tr>
                <td><%=goods.goods_id%></td>
                <td>
                    <div style="width:50px;"><%=goods.goods_sn || '无'%></div>
                </td>
                <td style="text-align: left;">
                    <div style="width:220px;"><%=goods.title%></div>
                </td>
                <td>
                    <div style="width:100px;"><%=goods.attrdata || '无'%></div>
                </td>
                <td><%=goods.price%></td>
                <td><%=goods.marketprice%></td>
                <td><%=goods.nums%></td>
            </tr>
            <%}%>
            </tbody>
        </table>
    </div>
    <style>
        .baseinfo tr td {
            padding: 6px;
        }

        .baseinfo {
            margin-bottom: 15px;
        }

        .deliverytable tr th {
            background: #f7f7f7;
        }

        .deliverytable tr td {
            border-bottom: 1px solid #eee;
        }

        .deliverytable tr td, .deliverytable tr th {
            padding: 8px 5px;
            text-align: center;
        }
    </style>
    <%}%>
</script>
